<?php

namespace sffi\WechatRobotPlug\msg_attribute;

trait MsgType
{
    protected int $type;

    public function getType()
    {
        return $this->type;
    }

    public function isText(): bool
    {
        return $this->type == 1;
    }

    public function isImage(): bool
    {
        return $this->type == 3;
    }
}